#ifndef _COMPRESS_FILE_WRITER_IMP_
#define _COMPRESS_FILE_WRITER_IMP_

#include "CompressFileWriter.h"
#include <fstream>

class CompressFileWriterImp : public CompressFileWriter
{
public:
	CompressFileWriterImp(void);
	~CompressFileWriterImp(void);

	virtual bool OpenOutputFile(std::string file);
	virtual void CloseFile();
	virtual void WriteString(std::string srcFileName);
	virtual void WriteDict(int bitSize, int code, int dataSize, BYTE* data);
	virtual void WriteInt(int count);
	virtual void WriteData(int inputCode, int bitSize);
	virtual int GetWriteBytes();

private:
	std::ofstream _file;
	unsigned int _buffer;
	int _usedBits;
	int _writeCount;
};

#endif